import 'package:flutter_clx_base/flutter_clx_base.dart';

class MyScaffoldTop extends StatelessWidget {
  const MyScaffoldTop({super.key, required this.child});

  final Widget child;

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: Stack(
        children: [
          Container(
            height: 230,
            decoration: BoxDecoration(
                image: DecorationImage(
              image: AssetImage(ImageUtils.getImgPath("bg_title_top")),
              fit: BoxFit.cover,
            )),
          ),
          Container(
            margin: const EdgeInsets.only(top: 130),
            height: 200,
            decoration: const BoxDecoration(
              borderRadius: BorderRadius.only(
                topLeft: Radius.circular(10),
                topRight: Radius.circular(10),
              ),
              gradient: LinearGradient(
                begin: Alignment.topCenter,
                end: Alignment.bottomCenter,
                colors: [
                  Color(0xFFFCFCFC),
                  Color(0xFFF3F5F8),
                ],
              ),
            ),
          ),
          SafeArea(child: child),
        ],
      ),
    );
  }
}
